In recent years, digital photography has become more popular. This increase in popularity has led to a proliferation of computer programs for editing images. These programs provide a variety of tools for organizing and editing images. Some of these programs include tools for removing blemishes from the image. Such blemishes include, for example, scratches and errant objects that were present in the original scene but are not wanted in the finished picture.
Prior blemish-removal tools often do not perform well in removing blemishes from some of the more complicated regions of images. For instance, they cannot remove blemishes satisfactorily from regions with one or more edges. FIG. 1 illustrates an example of this short-coming in prior blemish removal tools. Specifically, this figure illustrates a pastoral scene 100 that is disturbed by an earthworm 110 poking up out of the ground 112 and blocking part of the ground 112 and the sky 114. In this example, a blemish removal tool that provides a circular cursor 120 has been used (in a second scene 105) to select an area that encompasses the worm and the pixels around the worm within the circle.
In this example, the blemish removal tool does not account for the possibility that the selected area may overlap two different regions. Accordingly, FIG. 1 illustrates that in scene 107, which shows the results of using, the tool, that all the pixels within the selected area have been blurred from the outer edge of the area (blurring inward from edges is sometimes referred to as “inpainting”). The final result of using such a removal tool not only eliminates the worm, but also blends the sky 114 into the ground 112 and vice versa, as the tool does not recognize the edge in the image that is formed at the boundary between the ground and the sky. This blending is an undesirable distortion in the image.
Therefore, there is a need for a blemish removal tool that can remove blemishes from even complex regions, such as those that include one or more edges.